
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
        TEST(should be able to set the width of rectangle: 4)
        {
                Rectangle rectangle(2, 3);
                rectangle.setWidth(4);
                ASSERT_EQ(14, rectangle.getPerimeter());
        }

        TEST(should be able to set the height of rectangle: 4)
        {
                Rectangle rectangle(2, 3);
                rectangle.setHeight(4);
                ASSERT_EQ(12, rectangle.getPerimeter());
        }

        TEST(should be able to calculate the perimeter of rectangle: 2*(2+3)=10)
        {
                Rectangle rectangle(2, 3);
                ASSERT_EQ(10, rectangle.getPerimeter());
        }

        TEST(should be able to calculate the area of rectangle: 2*3=6)
        {
                Rectangle rectangle(2, 3);
                ASSERT_EQ(6, rectangle.getArea());
        }
};

